package com.zbw.common.service;

import com.zbw.common.entity.User;
import com.zbw.common.entity.UserBuyRecord;
import com.zbw.common.vo.UserDetails;
import io.github.xxyopen.model.resp.RestResult;

/**
 * @Description
 * @Author Zbw
 * @Date 2024/6/19
 */

public interface FrontUserService {
    UserDetails login(User user);

    UserDetails register(User user);

    Boolean queryIsInShelf(Long userId, Long bookId);

    void addToBookShelf(Long userId, Long bookId, Long preContentId);

    void removeFromBookShelf(Long userId, Long bookId);

    void addReadHistory(Long userId, Long bookId, Long preContentId);

    void addFeedBack(Long userId, String content);

    User userInfo(Long userId);

    void updateUserInfo(Long userId, User user);

    RestResult<?> updatePassword(Long userId, String oldPassword, String newPassword);

    boolean queryIsBuyBookIndex(Long id, Long bookIndexId);

     RestResult<?> buyBookIndex(Long userId, UserBuyRecord buyRecord);

    void addAmount(Long userId, int totalAmount);
//    PageBean<BookShelfVO> listBookShelfByPage(Long userId, Integer page, Integer pageSize);
}
